Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(repo): update devcontainer.json to use latest Node LTS (20.x.x)… #20020

Merged
merged 1 commit into from
Nov 3, 2023

Conversation

tinesoft
Copy link
Contributor

@tinesoft tinesoft commented Nov 2, 2023

… and improved initial setup

Current Behavior

As reported and discussed in the Nx Champion discord channel, right now, running a command lke nx test js within Nx repo opened inside a DevContainer, fails with the following error:

 Test suite failed to run

    /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /workspaces/nx/packages/nx/src/native/nx.linux-x64-gnu.node)

      180 |           try {
      181 |             if (localFileExisted) {
    > 182 |               nativeBinding = require('./nx.linux-x64-gnu.node')
          |                               ^
      183 |             } else {
      184 |               nativeBinding = require('@nx/nx-linux-x64-gnu')
      185 |             }

      at CompileFunctionRuntime._loadModule (../../node_modules/.pnpm/jest-runtime@29.5.0/node_modules/jest-runtime/build/index.js:1009:29)
      at Object.<anonymous> (../nx/src/native/index.js:182:31)
      at Object.<anonymous> (../nx/src/hasher/task-hasher.ts:23:1)
      at Object.<anonymous> (../nx/src/hasher/hash-task.ts:4:1)
      at Object.<anonymous> (../nx/src/tasks-runner/task-orchestrator.ts:20:1)
      at Object.<anonymous> (../nx/src/tasks-runner/default-tasks-runner.ts:2:1)
      at Object.<anonymous> (../nx/src/devkit-exports.ts:223:1)
      at Object.<anonymous> (../devkit/index.ts:15:1)
      at Object.<anonymous> (src/generators/release-version/utils/resolve-local-package-dependencies.spec.ts:1:1)

This was due to outdated native libraires (here GLIBC) in the underlying (Debian) OS of the base Docker Image
used by the devcontainer (https://hub.docker.com/_/microsoft-devcontainers-typescript-node)

Expected Behavior

Opening Nx repo within a devcontainer should work fine as it was initially.

This PR:

  • Updated the Node version to latest LTS (20.x.x)
  • Automated the udpate of the OS, to prevent aforementioned issue and include security patches
  • Use --frozen-lockfile when post installing npm dependencies,
  • Improved other settings in the devcontainer (default extensions installed, some settings)

Copy link

vercel bot commented Nov 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Nov 3, 2023 5:49am

@AgentEnder AgentEnder merged commit 6f8682a into nrwl:master Nov 3, 2023
6 checks passed
@tinesoft tinesoft deleted the fix/devcontainer branch November 3, 2023 20:12
Copy link

github-actions bot commented Nov 9, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants